<style>
.tinh{
border-color:#090;	
}
.t{
	font-size:15px;
	color:#016D3E;
}
.t1{
	text-align:center;
	font-weight:bold;
	color:#016D3E;
}
</style>
<div id="gioithieu">
   	<div id="tieude_1">
  	<p>THÔNG TIN KHÁCH HÀNG </p>
</div>
	<div id="noidung_gt"> 
    	<?php
			if(isset($_SESSION['taikhoan'])) {
				$sql="SELECT qldl_khach_hang.HO_TEN_TK, qldl_khach_hang.EMAIL_TK,
						qldl_tour.MA_TOUR,qldl_khach_hang.DIA_CHI_TK,
						qldl_khach_hang.SO_DT_TK, qldl_khach_hang.CMND_PASSPORT_TK, qldl_chi_tiet_dat_tour.NGAY_DAT_TOUR 
						FROM qldl_tour 
						inner join qldl_chi_tiet_dat_tour
						on qldl_tour.ma_tour=qldl_chi_tiet_dat_tour.ma_tour
						inner join qldl_khach_hang
						on qldl_chi_tiet_dat_tour.TEN_DN_TK=qldl_khach_hang.TEN_DN_TK
  						where qldl_khach_hang.TEN_DN_TK = '{$_SESSION['taikhoan']}'";
				$list=$mysqli->query($sql);
				if(@$list->num_rows > 0){
					echo "<table border='1' cellpadding='0' cellspacing='0' width='90%'>";
					echo"<th class='t1'>Mã tour</th>
						<th class='t1'>Họ tên KH</th>	
						<th class='t1'>Số điện thoại</th>
            			<th class='t1'>CMND</th>
             			<th class='t1'>Ngày đặt tour</th>";	
					while($row=$list->fetch_array()){
						echo "<tr class='t' align='center' >
							<td><a href='index.php?id=tt_dat_tour?amp={$row['MA_TOUR']}'>{$row['MA_TOUR']}</a></td>";
            			echo "<td >$row[HO_TEN_TK]</td>";
						echo "<td >$row[SO_DT_TK]</td>";
						echo "<td >$row[CMND_PASSPORT_TK]</td>";
						$date = $row['NGAY_DAT_TOUR'];
						$arr_date = explode("-",$date);
						$day = $arr_date[2];
						$month = $arr_date[1];
						$year = $arr_date[0];
						$ngay_dang = $day."/".$month."/".$year;	
						echo "<td>$ngay_dang</td>";
						echo "</tr>";
					}
					echo"</table>";
				}
			}
			else echo"Không tìm thấy thông tin khách hàng";
		?>
        </div>
        </div>
       
               
